package com.dzx.feign;

import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "consul-provider", fallback = ProviderFeignService.class)
public interface ProviderClientFeign {

    @GetMapping(value = "/hi")
    String sayHiFromClientConsul(@RequestParam(value = "name") String name);

    @PostMapping(value = "/hi2")
    String sayHiFromClientConsul2(@RequestBody JSONObject jsonObject);

}
